/*
 *  shnode_math.h
 *  shaderz_v3
 *
 *  Created by Anjali on 4/7/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef __SHADERZ_MATH_NODES__
#define __SHADERZ_MATH_NODES__

#include "shdefs.h"
#include "shnode.h"

namespace shaderz
{
	// 0 input, 1 output node representing a const
	class shNodeConstant : public shNode
	{
	public:
		shNodeConstant( const std::string& InNodeName, float InConstVal[], int InElementCount = 1 );
		virtual void evaluate();
		
#ifdef SH_DEBUG
public:
	virtual void dumpNodeStats() const;
#endif
		
	private:
		typedef shNode	ParentClass;
	};

	// n input, 1 output math operation node
	class shNodeMath : public shNode
	{
	public:
		enum MathOperation { SHMO_Add=0, SHMO_Subtract, SHMO_Multiply, SHMO_Division };
	
	public:
		shNodeMath( const std::string& InNodeName, MathOperation InMathOperation );
		virtual void evaluate();
		
	protected:
		MathOperation	mMathOperation;
		
#ifdef SH_DEBUG
public:
		virtual void dumpNodeStats() const;
#endif
		
	private:
		typedef shNode	ParentClass;
	};
}

#endif